# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences do
  @moduledoc """
  The regional resource name or the URI. Key is region, e.g., us-central1, europe-west2, global, etc..

  ## Attributes

  *   `references` (*type:* `%{optional(String.t) => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelResourceReference.t}`, *default:* `nil`) - Required.
  *   `resourceDescription` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the resource.
  *   `resourceTitle` (*type:* `String.t`, *default:* `nil`) - Optional. Title of the resource.
  *   `resourceUseCase` (*type:* `String.t`, *default:* `nil`) - Optional. Use case (CUJ) of the resource.
  *   `title` (*type:* `String.t`, *default:* `nil`) - Required. 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :references =>
            %{
              optional(String.t()) =>
                GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelResourceReference.t()
            }
            | nil,
          :resourceDescription => String.t() | nil,
          :resourceTitle => String.t() | nil,
          :resourceUseCase => String.t() | nil,
          :title => String.t() | nil
        }

  field(:references,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelResourceReference,
    type: :map
  )

  field(:resourceDescription)
  field(:resourceTitle)
  field(:resourceUseCase)
  field(:title)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
